package com.mht.book.entity.book;

import java.io.Serializable;

/**
 * @author wangfusheng
 * @version 1.0.0
 * @ClassName Book.java
 * @Description TODO
 * @createTime 2022/12/311:06
 */
//todo  有功能尚未完善
public class Book implements Serializable {
    /**
     * 图书名称
     */
    private String name;
    /**
     * 图书作者
     */
    private String author;
    /**
     * 价格
     */
    private int price;
    /**
     * 图书类型
     */
    private String type;
    /**
     * 是否被借阅
     */
    private boolean isBorrowed;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public boolean getIsBorrowed() {
        return isBorrowed;
    }

    public void setIsBorrowed(boolean isBorrowed) {
        this.isBorrowed = isBorrowed;
    }

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", price=" + price +
                ", type='" + type + '\'' +
                ", isBorrowed='" + (isBorrowed==false?"未借阅":"已借阅") + '\'' +
                '}';
    }

    public Book(String name, String author, int price, String type, boolean isBorrowed) {
//        super();
        this.name = name;
        this.author = author;
        this.price = price;
        this.type = type;
        this.isBorrowed = isBorrowed;
    }

}
